package com.fengye.validation.controller;

import com.fengye.validation.dto.User;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author haiqing.gao
 * @since 2023-12-06 11:45
 */

@RestController
public class UserController {

    @PostMapping("/query")
    public User getUser(@Validated @RequestBody User user) {
        return user;
    }
}
